intersection

abstract fun intersection(other: Segment<V>, equivalence: DoubleEquivalence = DEFAULT_DOUBLE_EQUIVALENCE): IntersectionData<V>(source)

Compute the intersection of this segment with another segment.

Return

A new segment representing the intersection, or null if there is no intersection/ the produce an infinite amount of intersections.

Parameters

other

The other segment to intersect with.

equivalence

The equivalence to use for comparing floating-point values. Defaults to DEFAULT_DOUBLE_EQUIVALENCE.